<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>修改密码</title>
    <%--    <link rel="stylesheet" href="/hire/plugins/bootstrap/css/bootstrap.css">--%>
    <%--    <link rel="stylesheet" href="/hire/plugins/layui/css/layui.css">--%>
    <link rel="stylesheet" href="/hire/css/user/login/login.css">
    <style>
        #error_email {
            display: none;
        }

        #error_pwd {
            display: none;
        }
    </style>

    <link rel="stylesheet" href="/hire/css/user/login/login.css">
</head>
<body>
<div class="login_port">
    <h1>轻聘</h1><span>&nbsp|&nbsp修改密码&nbsp|&nbsp</span><a href="/hire/user/account_settings">返回</a>
</div>

<div id="login-box">
    <form class="form" style="display: block;" id="change_from">
        <div class="item">
            <i class="username" style="font-size:24px;position:relative"></i>
            <img src="/hire/imgs/username.png" alt="">
            <input type="text" name="phone" id="oldPassword" value="" placeholder="原密码">
            <br>
            <label class="text-danger" style="display: none">密码错误</label>
        </div>
        <div class="item">
            <i class="password" style="font-size:24px"></i>
            <img src="/hire/imgs/password.png" alt="">
            <input type="password" name="newPassword" id="newPassword" value="" placeholder="新密码">
            <br>
        </div>
        <div class="item">
            <i class="password" style="font-size:24px"></i>
            <img src="/hire/imgs/password.png" alt="">
            <input type="password" name="newPasswordAgain" id="newPasswordAgain" value="" placeholder="确认密码">
            <br>
            <label class="text-danger" id="error_" style="display: none">两次输入不一致</label>
        </div>
        <div class="login-button">
            <button type="button" onclick="change()">修改密码</button>
        </div>
    </form>
</div>
<script src="/hire/plugins/jquery/jquery.min.js"></script>
<script src="/hire/plugins/layui/layui.js"></script>
<script src="/hire/plugins/bootstrap/js/bootstrap.min.js"></script>
<script>
    function change() {
        let oldPassword = $("#oldPassword").val();
        let newPassword = $("#newPassword").val();
        let newPasswordAgain = $("#newPasswordAgain").val();
        console.log(oldPassword)
        console.log(newPassword)
        console.log(newPasswordAgain)
        $.post("/hire/user/update/possword",{oldPassword:oldPassword,newPassword:newPassword,newPasswordAgain:newPasswordAgain},function (res) {

        })
    }
</script>




















































<%--<script>--%>
<%--    function login1() {--%>
<%--        let param = $("#login_from").serialize();--%>
<%--        $.post('/hire/user/logincl', param, function (res) {--%>
<%--            // console.log(res)--%>
<%--            if (res.code == '200') {--%>
<%--                //跳转--%>
<%--                window.location = '/hire/index';--%>
<%--            } else {--%>
<%--                layer.msg(res.msg);--%>
<%--            }--%>
<%--        })--%>
<%--    }--%>
<%--</script>--%>
<%--<script>--%>
<%--    window.onload = function () {--%>
<%--        let buttons = document.getElementsByClassName('login_method')[0].getElementsByTagName('button');--%>
<%--        // console.log(buttons);--%>
<%--        let forms = document.getElementsByClassName('form');--%>
<%--        // console.log(forms);--%>
<%--        for (let i = 0; i < buttons.length; i++) {--%>
<%--            let button = buttons[i];--%>
<%--            //console.log(button)--%>
<%--            button.id = i;--%>
<%--            // console.log(button.id);--%>
<%--            // 设置每个button标签的onclick事件--%>
<%--            button.onclick = function () {--%>
<%--                // 清除所有标签的css设置，隐藏dom标签--%>
<%--                for (let j = 0; j < forms.length; j++) {--%>
<%--                    buttons[j].className = " ";--%>
<%--                    forms[j].style.display = "none";--%>
<%--                }--%>
<%--                // 设置当前标签样式及当前标签下的所有dom标签可见--%>
<%--                this.className = 'current';--%>
<%--                // 当前div可见--%>
<%--                forms[this.id].style.display = 'block';--%>
<%--            }--%>
<%--        }--%>
<%--    }--%>
    <%--<script src="/hire/plugins/jquery/jquery.min.js"></script>--%>
    <%--<script src="/hire/plugins/bootstrap-3.4.1-dist/js/bootstrap.min.js"></script>--%>

</script>
</body>
</html>